<%@ Page Language="VB" MasterPageFile="~/Admin/admin.master" AutoEventWireup="false" CodeFile="appSupportBroker.aspx.vb" Inherits="admin_appSupportBroker" title="Admin - Application Settings - Support Broker Agency Set Up" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
<%@ Register Src="SubNavControls/AppSubNavControl.ascx" TagName="AppSubNavControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

<asp:ObjectDataSource runat="server" id="CountyODS" DataObjectTypeName="Cdm.DataCore.LookupTables.LuCounty" SelectMethod="ListAll" TypeName="Cdm.DataCore.LookupTables.LuCounty">
</asp:ObjectDataSource>

   <asp:ObjectDataSource ID="SupportBrokerObjectDataSource" DataObjectTypeName="Cdm.DataCore.Entities.SupportBrokerAgency" TypeName="Cdm.DataCore.Entities.SupportBrokerAgency" SelectMethod="ListBySort"
     UpdateMethod="UpdateInstance" InsertMethod="SaveInstance" DeleteMethod="RemoveInstance" runat="server" SortParameterName="sortExpr"></asp:ObjectDataSource>
    
 

<uc1:AppSubNavControl ID="SubNavCtrl" runat="server" />

<table cellpadding="0" cellspacing="0" border="0">
       <tr><td width="20px" rowspan="4"></td><td><h1><a id="pagecontent">Admin - Application Settings - <asp:Label ID="SupportBrokerLabel" runat="server">Support Broker</asp:Label> Agency Setup</a></h1></td></tr>
       <tr>
          <td><cc2:ValidationErrorSummary ID="ErrorSummary" runat="server" Message="" Visible="false" /></td></tr>
        <tr><td>        <cc2:ScrollingGridView ID="SupportBrokerScrollingGridView" runat="server" CssClass="gridOffsetSmall" HorizontalAlign="center" Width="825px" CellPadding="5" ToolTip="160"
                            AutoGenerateColumns="False" DataSourceID="SupportBrokerObjectDataSource" BorderColor="#21334B" 
                            BorderStyle="Solid" GridLines="Vertical" DataKeyNames="SupportBrokerAgencyID" AllowSorting="true">
                        <HeaderStyle CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
                        <RowStyle CssClass="adminColumnStyle" />
                            <Columns>
                                <asp:BoundField DataField="AgencyName" SortExpression="AgencyName" HeaderText="Agency" ItemStyle-Width="350px" HeaderStyle-Width="357px" />
                                <asp:BoundField DataField="CaseLimit" SortExpression="CaseLimit" HeaderText="Caseload Limit per Support Broker">
                                    <ItemStyle HorizontalAlign="Center" Width="200px" />
                                    <HeaderStyle Width="200px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Active" SortExpression="Active" >
                                    <ItemStyle HorizontalAlign="Center" Width="150px" />
                                    <HeaderStyle Width="150px" />
                                    <ItemTemplate>
                                        <asp:CheckBox ID="EditActiveCheckBox" runat="server" Enabled="false" CssClass="formSelectRadio" Checked='<%#Eval("Active") %>' />
                                     </ItemTemplate>
                                     <EditItemTemplate>
                                        <asp:CheckBox ID="EditActiveCheckBox" runat="server" Enabled="true" CssClass="formSelectRadio" Checked='<%#Eval("Active") %>' />
                                     </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowEditButton="True" HeaderText="Action" AccessibleHeaderText="Action">
                                    <ItemStyle HorizontalAlign="Center" Width="75px" />
                                    <HeaderStyle Width="105px" />
                                </asp:CommandField>
                            </Columns>
                        <AlternatingRowStyle BackColor="#E8ECF4" />
        </cc2:ScrollingGridView>
                    </td>
                </tr>
                <tr>
                <td>  <asp:Panel ID="DetailsPanel" runat="server" Height="200px" ScrollBars="Auto" Visible="false">
                           <asp:DetailsView ID="SupportBrokerDetailsView" runat="server" CssClass="gridOffset" 
            Width="825px" AutoGenerateRows="False" DataSourceID="SupportBrokerObjectDataSource" 
            DefaultMode="Insert" GridLines="None" Visible="False">
            <Fields>
                <asp:TemplateField>
                <ItemTemplate>
                    <table border="0" cellpadding="3" cellspacing="0" width="700px">
                        <tr>
                            <td>
                                <asp:Label ID="ProviderNumberLabel" runat="server" AssociatedControlID="ProviderNumberTextBox" Text="Medicaid Provider Number*:" Font-Bold="true" CssClass="labelSmall"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="ProviderNumberTextBox" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Label ID="FieldNameLabel" runat="server" AssociatedControlID="FieldNameTextBox" Text="Agency Name*:" CssClass="labelSmall" Font-Bold="true"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="FieldNameTextBox" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="CaseLimitLabel" runat="server" AssociatedControlID="CaseLimitTextBox" Text="Support Broker caseload limit*:" Font-Bold="true" CssClass="labelSmall"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="CaseLimitTextBox" runat="server" CssClass="form" Columns="10"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="StreetAddress1Label" runat="server" CssClass="labelSmall" AssociatedControlID="txtSA1">Street Address 1:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSA1" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="StreetAddress2Label" runat="server" CssClass="labelSmall" AssociatedControlID="txtSA2">Street Address 2:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSA2" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="StreetAddress3Label" runat="server" CssClass="labelSmall" AssociatedControlID="txtSA3">Street Address 3:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSA3" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                        </tr> 
                        <tr>
                            <td align="right">
                                <asp:Label ID="StreetAddessCityLabel" runat="server" CssClass="labelSmall" AssociatedControlID="txtSACity">City:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSACity" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="StreetAddressStateLabel" runat="server" CssClass="labelSmall" AssociatedControlID="txtSAState">State:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSAState" runat="server" CssClass="formSmall" maxlength="2"></asp:TextBox>
                            </td>
                        </tr> 
                        <tr>
                            <td align="right">
                                <asp:Label ID="StreetAddressZipLabel" runat="server" CssClass="labelSmall" AssociatedControlID="txtSAZip">Zip Code:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtSAZip" runat="server" CssClass="formSmall"></asp:TextBox>  
                            </td>
                            <td align="right">
                                <asp:Label ID="ActiveLabel" runat="server" AssociatedControlID="ActiveCheckBox" Text="Active?:" CssClass="labelSmall"></asp:Label>
                            </td>
                            <td>
                                <asp:CheckBox ID="ActiveCheckBox" runat="server" CssClass="formRadio" Checked="true" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="ContactFirstNameLabel" runat="server" CssClass="labelSmall" AssociatedControlID="txtContactFirstName">Contact First Name:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtContactFirstName" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="ContactLastNameLabel" runat="server" CssClass="labelSmall" AssociatedControlID="txtContactLastName">Contact Last Name:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtContactLastName" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                        </tr> 
                        <tr>
                            <td colspan="2">
                               <cc2:PhoneInputControl ID="PhoneNumberInputControl" runat="server" Editable="true" cssClassLabel="labelSmall" Required="true" Title="Telephone Number" cssClassControl="formSmall" /> 
                            </td>
                            <td colspan="2">
                               <cc2:PhoneInputControl ID="FaxNumberInputControl" runat="server" cssClassLabel="labelSmall" Title="Fax Number" cssClassControl="formSmall" /> 
                            </td>
                        </tr> 
                        <tr>
                            <td align="right">
                                <asp:Label ID="EmailAddressLabel" runat="server" CssClass="labelSmall" AssociatedControlID="txtEmailAddress">Email Address:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmailAddress" runat="server" CssClass="formSmall"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="CountyLabel" runat="server" CssClass="labelSmall" AssociatedControlID="ddlCounty">County:</asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlCounty" runat="server" CssClass="formSmall" Title="County" DataSourceID="CountyODS" DataTextField="Description" DataValueField="CountyId" ></asp:DropDownList>
                            </td>
                        </tr> 
<%--                        <tr>
                            <td><asp:Label ID="ActiveLabel" runat="server" Text-Align="right" AssociatedControlID="ActiveCheckBox" Text="Active?:" CssClass="adminLabel"></asp:Label></td>
                            <td><asp:CheckBox ID="ActiveCheckBox" runat="server" CssClass="formSelectRadio" Checked="true" /></td>
                        </tr>--%>
                    </table>                
                </ItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>
        </asp:Panel>
                </td>
                </tr>
                
            </table>

     
        
        <asp:HiddenField ID="hfMode" runat="server" Value="INSERT" />
        <asp:HiddenField ID="hfSupportBrokerAgencyId" runat="server" />
        
</asp:Content>
<asp:Content ID="FixedContent" runat="server" ContentPlaceHolderID="ContentPlaceHolderFixedAdmin">
    <asp:Button ID="AddAgencyButton" runat="server" Text="Add Agency" />
    <asp:Button ID="SubmitButton" runat="server" Text="Submit" Visible="false" />
    <asp:Button ID="CancelButton" runat="server" Text="Cancel" Visible="false"/>
</asp:Content>

